<template>
	<view>
		<view class="header">
			<navigator class="message" url="/pages/index/message/message">
				消息中心
			</navigator>
			<view class="personalInfo">
				<image src="../../static/c1.png" />
				<view>xxx修车厂，欢迎您</view>
			</view>
			<view class="erCode">
				<image src="../../static/扫码.png" />
				扫码核销
			</view>
			<navigator class="writeCode" url="/pages/numberScan/numberScan">
				<image src="../../static/输入2.png" />
				输入核销码
			</navigator>
		</view>
		<view class="middle">
			<uni-grid :column="3" :square="false" border-color="#f6f6f6">
				<uni-grid-item v-for="(item,index) in gridItem" :key="index">
					<view class="gridItem" @click="change(item)">
						<image :src="item.imgUrl"></image>
						<view>{{item.name}}</view>
					</view>
				</uni-grid-item>
			</uni-grid>
		</view>
		<view class="foot">
			<view class="notice">
				<image src="../../static/通知.png" mode=""></image>
				<text style="font-size: 30rpx;font-weight: bolder;">最新通知</text>
				<view>今日需上门取件共32件</view>
			</view>
		</view>
		<uni-table border stripe emptyText="暂无更多数据">
			<!-- 表头行 -->
			<uni-tr>
				<uni-th align="center" width="100rpx">用户</uni-th>
				<uni-th align="center" width="250rpx">服务项目</uni-th>
				<uni-th align="center" width="200rpx">时间</uni-th>
			</uni-tr>
			<!-- 表格数据行 -->
			<uni-tr>
				<uni-td>林黛玉</uni-td>
				<uni-td>汽车美容，到点维修</uni-td>
				<uni-td>2020-10-21 11:09</uni-td>
			</uni-tr>
			<uni-tr>
				<uni-td>贾宝玉</uni-td>
				<uni-td>汽车美容，到点维修</uni-td>
				<uni-td>2020-10-21 11:09</uni-td>
			</uni-tr>
		</uni-table>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				gridItem: [{
					imgUrl: "../../static/统计.png",
					name: '经营统计',
					gridUrl: '/pages/businessStatistics/businessStatistics'
				}, {
					imgUrl: "../../static/核销记录 (1).png",
					name: '核销记录',
					gridUrl: '/pages/cvRecords/cvRecords'
				}, {
					imgUrl: "../../static/123收支明细.png",
					name: '收支明细',
					gridUrl: '/pages/incomeAndExpensesDetail/incomeAndExpensesDetail'
				}, {
					imgUrl: "../../static/订单管理.png",
					name: '订单管理',
					gridUrl: '/pages/function/orderManagement/orderManagement'
				}, {
					imgUrl: "../../static/卡券.png",
					name: '卡券管理',
					gridUrl: '/pages/card/card'
				}, {
					imgUrl: "../../static/维修.png",
					name: '维修任务',
					gridUrl: '/pages/repairTasks/repairTasks'
				}, {
					imgUrl: "../../static/评价管理.png",
					name: '评价管理',
					gridUrl: '/pages/evaluate/evaluate'
				}, {
					imgUrl: "../../static/商户资料.png",
					name: '商户资料',
					gridUrl: '/pages/businessInfo/businessInfo'
				}, {
					imgUrl: "../../static/活动.png",
					name: '活动发布',
					gridUrl: '/pages/eEventRelease/eEventRelease'
				}]
			}
		},
		methods: {
			change(e) {
				uni.navigateTo({
					url: e.gridUrl
				})
			}
		}
	}
</script>

<style>
	page {
		background-color: white;
	}

	.header {
		background-color: #0D7AF7;
		height: 300rpx;
		position: relative;
	}

	.personalInfo {
		display: flex;
		height: 160rpx;
		align-items: center;
		color: white;
		font-size: 40rpx;
		padding: 45rpx;
	}

	.personalInfo>image {
		height: 160rpx;
		width: 160rpx;
		background-color: white;
		border-radius: 100%;
		margin-right: 45rpx;
	}

	.personalInfo>view {
		line-height: 160rpx;
		font-weight: bolder;
	}

	.erCode {
		background-color: white;
		position: absolute;
		height: 50rpx;
		width: 250rpx;
		border: 1rpx solid #F0F0F0;
		border-radius: 15rpx;
		left: 44rpx;
		bottom: -30rpx;
		display: flex;
		padding: 25rpx;
		font-weight: bolder;
		z-index: 9;
	}

	.erCode image {
		width: 48rpx;
		height: 48rpx;
		margin-right: 40rpx;
	}

	.writeCode {
		background-color: white;
		position: absolute;
		height: 50rpx;
		width: 250rpx;
		border: 1rpx solid #F0F0F0;
		border-radius: 15rpx;
		right: 44rpx;
		bottom: -30rpx;
		display: flex;
		padding: 25rpx;
		font-weight: bolder;
		z-index: 9;
	}

	.writeCode image {
		width: 48rpx;
		height: 48rpx;
		margin-right: 40rpx;
	}

	.gridItem {
		text-align: center;
		font-weight: bolder;
		font-size: 30rpx;
		line-height: 50rpx;
		margin-bottom: 20rpx;

	}

	.gridItem image {
		width: 60rpx;
		height: 60rpx;
		margin-top: 30rpx;
	}

	.notice {
		display: flex;
		margin: 20rpx;
	}

	.notice image {
		width: 48rpx;
		height: 48rpx;
		margin-right: 20rpx;
	}

	.notice view {
		font-size: 28rpx;
		font-weight: bolder;
		color: red;
		margin-left: auto
	}

	.message {
		color: black;
		position: absolute;
		top: 20rpx;
		right: 20rpx;

	}
</style>